package bkcad;

import java.util.Iterator;
import java.util.Scanner;

/**
 * Tower entity
 * @author hoangpt
 */
public class Tower {

	public int height; //properties
	
	public void inputHeight() {
		System.out.print("Input height:");
		Scanner scan = new Scanner(System.in);
		height = scan.nextInt();
		
	}

	public void buildTower() {
		//build floor
		for (int i = 1; i <= height; i++) { //i=floor
			/**
			 * 1 -- 3 space 1*
			 * 2 -- 2 space 3*
			 * 3 -- 1 space 5*
			 */
			//space build
			for (int j = 1; j <= height-i; j++) {
				System.out.print(" ");
			}
			//* build
			for (int j = 1; j <= 2*i-1; j++) {
				System.out.print("*");
			}
			System.out.println();
		}
	}

}
